package com.chinaisafe.demo.vo.request;

import com.chinaisafe.base.common.vo.request.PageReqVo;
import com.chinaisafe.base.common.validated.UpdateGroup;
import jakarta.validation.constraints.NotNull;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * DemoTableReqVO
 * Description：测试类请求值对象
 *
 * @author JiangZhaoYong
 * @date  2024-07-15 13:00:14
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@Schema(name = "DemoTableReqVO", description = "测试类请求值对象")
public class DemoTableReqVO extends PageReqVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @NotNull(groups = UpdateGroup.class, message = "主键id不能为空" )
    private Long id;

    @Schema(description = "乐观锁版本")
    private Integer version;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "年龄")
    private Integer age;

    @Schema(description = "时间日期字段")
    private LocalDateTime dataTimeField;

    @Schema(description = "日期字段")
    private LocalDate dataField;

    @Schema(description = "时间字段")
    private LocalTime timeField;

}
